package com.sensei.search.client;

import com.sensei.search.client.SenseiConnResource.HostAddr;
import com.sensei.search.util.pool.ResourceFactory;

public class SenseiConnResourceFactory implements ResourceFactory<HostAddr,SenseiConnResource> {

	public SenseiConnResource create(HostAddr key) throws Exception {
		return new SenseiConnResource(key);
	}

	public void destroy(HostAddr key, SenseiConnResource obj) throws Exception {
		obj.close();
	}

	public boolean validate(HostAddr key, SenseiConnResource value) {
		return true;
	}
}
